<%@ page contentType="text/html; charset=utf-8" %>

<%@ include file="/WEB-INF/jsp/includeTaglib.jsp" %>
<%@ include file="/WEB-INF/jsp/includeCss.jsp" %>
<%@ include file="/WEB-INF/jsp/includeJs.jsp" %>


<form id="saveTaskStepForm" target="tempFrame" method="post" action="<c:url value='/admin/saveTaskStep.html' />">
	<table width="100%" border="0" cellpadding="0" cellspacing="5">
	  <tr>
	    <td valign="top">
	      <table class="dbborder" width="100%" border="0" cellpadding="0" cellspacing="0">
	        <tr>
	          <td valign="bottom" class="blueTableBg">&nbsp;配置管理&nbsp;-&nbsp;子步骤项</td>
	        </tr>
	        <tr>
	          <td>
	            <table width="100%" border="0" cellpadding="0" cellspacing="5">
	              <tr>
	                <td>
	                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
	                    <tr>
	                      <td class="dashTopLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                      <td class="dashTop" width=100%><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                      <td class="dashTopRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                    </tr>
	                    <tr>
	                      <td class="dashLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                      <td align="center">
	                        <table width="100%" border="0" cellpadding="0" cellspacing="3">
	                          <tr>
	                            <td width="114" height="20" class="globalText">数据类型</td>
	                            <td height="20" class="globalText">
	                            		${task.dataTypeName}
	                            </td>
	                          </tr>

	                          <tr>
	                            <td valign="top" width="114" height="20" class="globalText">
	                            	子步骤:
	                            </td>
	                            <td height="20" class="globalText">
	                            	<div style="margin-left: 20px;">
	                            		<ul>
	                            			<c:forEach var="taskItem" items="${task.taskItems}" varStatus="status">
	                            				<c:if test="${task.actionId==4}">
	                            					<li id="hideBlock" style="margin-bottom: 5px;">
														<p><b>选项名</b>:${taskItem.name}</p>
													</li>
	                            				</c:if>
	                            				<c:if test="${task.actionId==6}">
	                            					<li id="hideBlockExtra" style="margin-bottom: 5px;">
														<p><b>选项名</b>:${taskItem.name}</p>
														<p><b>类型</b>:${taskItem.extra1}</p>
														<p><b>值</b>:
															<c:if test="${taskItem.extra2==0}">
																否
															</c:if>
															<c:if test="${taskItem.extra2==1}">
																是
															</c:if>
														</p>
														<p><b>说明</b>:${taskItem.extra3}</p>
													</li>
	                            				</c:if>
	                            			</c:forEach>
	                            		</ul>
	                            	</div>
	                            </td>
	                          </tr>
	                        </table>
	                      </td>
	                      <td class="dashRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                    </tr>
	                    <tr>
	                      <td class="dashBottomLeft"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                      <td class="dashBottom" width=100%><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                      <td class="dashBottomRight"><img src="<c:url value='/images/spacer.gif' />" width="7" height="7"></td>
	                    </tr>
	                  </table>
	                </td>
	              </tr>
	            </table>
	          </td>
	        </tr>
	      </table>
	    </td>
	  </tr>
	</table>

</form>

<div align="center">
	<input onclick="javascript:window.history.back();" type="button" class="btnStyle" value=" 返回  ">
	<input onclick="javascript:removeStep()" type="button" class="btnStyle" value="删除">
</div>

<div style="display: none;">
	<li id="hideBlock" >选项:
		<input class="required" style="margin-right: 6px; margin-bottom: 3px;" type="text" />
		<a id="delBtn" itemNameId href="javascript:void(0)">删除<a/>
	</li>


	<li id="hideBlockExtra" >选项:
		<input id="inputName" class="required" style="margin-right: 6px; margin-bottom: 3px;" type="text" />
		<select class="required ext" style="margin-right: 6px; margin-bottom: 3px;">
			<option>Stopping</option>
			<option>Holding</option>
			<option>Closing</option>
			<option>Base requirement</option>
			<option>机动分</option>
		</select>
		<input  class="required digits ext" style="margin-right: 6px; margin-bottom: 3px;width: 35px; " type="text" />

		<input  class="required ext" style="margin-right: 6px; margin-bottom: 3px;" type="text" />
		<a id="delBtn" itemNameId href="javascript:void(0)">删除<a/>
	</li>
</div>

<form target="tempFrame" method="post" id="removeStep" action="<c:url value='/admin/removeStep.html' />">
    <input type="hidden" id="stepId" name="taskId" value="${task.id}"/>
</form>
<script type="text/javascript">
    function removeStep() {
        if (confirm('删除［步骤项］并不修改使用该步骤项的［任务］\n删除后如果需要恢复，请联系系统管理员\n\n请确认是否删除步骤项？')) {
            $('#removeStep').submit();
        }
    }

    function submitCallbackSuccess(obj){
        window.location="<c:url value='/admin/stepList.html' />";
    }
</script>
